package com.molinari.coding.activities;

import android.content.Intent;
import android.view.MenuItem;

import com.molinari.androidstructure.activity.BaseActivity;
import com.molinari.coding.ControllerCoding;
import com.molinari.coding.R;
import com.molinari.coding.activities.login.LoginActivity;

public abstract class CodingBaseActivity extends BaseActivity {

	@Override
	public int getIdMenu() {
		return R.menu.main;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.action_esci:
			ControllerCoding.getSingleton().setUtenteLogin(null);
			final Intent i = new Intent(this, LoginActivity.class);
            this.startActivity(i);
			return true;
		}
		return super.onOptionsItemSelected(item);
	}
}
